/**
 * @Author Big_white
 * @Date 2021/11/9
 */
public class Decorator extends Drink{
    private Drink obj;

    public Decorator(Drink obj) {
        this.obj = obj;
    }

    //自己调料的价格
    @Override
    public float cost() {
        return super.getPrice()+obj.cost();
    }

    @Override
    public String getDes() {
        return super.des+ " " +super.getPrice()+" &&"+obj.getDes();
    }
}
